<!-- saved from url=(0022)http://internet.e-mail -->
<%@ page import="java.sql.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Fixation Summary</title>
<style type="text/css">
<!--
.style3 {
	font-family: Arial;
	font-size: 12px;
}
-->
</style>
</head>
<body>
	  <table width="100%" height = "30"  border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFBF0">
<%
int dLoop=0;
ResultSet Rs = task.fetchUnfixedContractList();
String R_id = "";
String Colour="";
float pending = 0;
float unfixed = 0;
while (Rs.next())
{
		//R_id = Rs.getInt("id");
		pending = Rs.getFloat("Tons")-Rs.getFloat("receive_tons");
		unfixed = Rs.getFloat("unfixed_tons");
		if (unfixed > 0) Colour = "#FF0000";
		if (unfixed ==0) Colour = "#000000";
%>
        <tr id=<%=Rs.getInt("id")%> onDblClick="cardViewClick(this);" onClick="highlightOn(this);">
          <td width="4%" align="center"><span class="style3"><%=Rs.getInt("id")%></span></td>
          <td width="14%" style="color:<%=Colour%>" align="center"><span class="style3"><%=Rs.getString("ref_number")%></span></td>		  
          <td width="14%" style="color:<%=Colour%>" align="center"><span class="style3"><%=Rs.getString("contract_no")%></span></td>
          <td width="20%" align="left"><span class="style3"><%=task.getFieldValueForId("company_master","name",Rs.getInt("supplier_buyer_id"))%></span></td>
          <td width="7%" align="left"><span class="style3"><%=Rs.getString("terminal_market")%></span></td>
		  <%
		  	String TM = "";
			if (Rs.getDate("terminal_month") == null) TM = "-";
			if (Rs.getDate("terminal_month") != null) TM = Utils.dateToStr(Rs.getDate("terminal_month")).substring(3);
		  %>
          <td width="6%" align="left"><span class="style3"><%=TM%></span></td>
          <td width="5%" align="left"><span class="style3"><%=Rs.getString("type")%></span></td>
          <td width="4%" align="right"><span class="style3"><%=Utils.numberToStr(Rs.getFloat("differential"),0)%></span></td>
          <td width="9%" align="right"><span class="style3"><%=Utils.numberToStr(Rs.getFloat("contract_price_foreign"),2)%></span></td>
		  <%
		  		if (Rs.getString("terminal_market").compareTo("LIFFE")==0)
				{
		  %>
          <td width="7%" align="right"><span class="style3"><%=Utils.numberToStr(Rs.getFloat("fixed_tons")/10,0)%></span></td>		  
          <td width="10%" align="right"><span class="style3"><%=Utils.numberToStr(Rs.getFloat("unfixed_tons")/10,0)%></span></td>
		  <%
		  		}
				else
				{
		  %>
          <td width="9%" align="right"><span class="style3"><%=Utils.numberToStr(Rs.getFloat("fixed_tons")/17.01,0)%></span></td>		  
          <td width="8%" align="right"><span class="style3"><%=Utils.numberToStr(Rs.getFloat("unfixed_tons")/17.01,0)%></span></td>
		  <%
		  		}
		  %>		  
        </tr>
<%
		dLoop=dLoop+1;
}
%>
</table>
</body>
</html>
